package cn.teduymdj.jxc.service;



import cn.teduymdj.jxc.pojo.dto.ReturnListAddNewDTO02;
import cn.teduymdj.jxc.pojo.dto.SelectReturnCondition;
import cn.teduymdj.jxc.pojo.dto.SelectReturnListCondition;
import cn.teduymdj.jxc.pojo.entity.ReturnList;
import cn.teduymdj.jxc.pojo.entity.ReturnListGoods;
import cn.teduymdj.jxc.pojo.vo.PurchaseListCountListItemVO;
import cn.teduymdj.jxc.pojo.vo.ReturnListGoodsListItemVO;
import cn.teduymdj.jxc.pojo.vo.ReturnListListItemVO;
import cn.teduymdj.jxc.pojo.vo.SaleListCountListItemVO;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 退货商品service接口
 *
 */
@Transactional
public interface ReturnListGoodsService {
	
	/**
	 * 保存商品退货清单，商品退货列表，修改商品属性
	 * @param returnList 商品退货单
	 * @param returnListGoodsList 商品退货列表
	 */
	public void save(ReturnListAddNewDTO02 returnList);
	
	/**
	 * 退货单查询
	 * @param returnNumber 单号
	 * @param supplierId 供应商ID
	 * @param state 付款状态
	 * @param sTime 开始时间
	 * @param eTime 结束时间
	 * @return
	 */
	public List<ReturnListListItemVO> getReturnlist(SelectReturnListCondition selectReturnListCondition);
	
	/**
	 * 根据退货单ID查询退货商品信息
	 * @param returnListId 退货单ID
	 * @return
	 */
	public List<ReturnListGoodsListItemVO> getReturnListGoodsByReturnListId(Long returnListId);
	
	/**
	 * 删除退货单及退货单商品信息
	 * @param returnListId 退货单ID
	 */
	public void delete(Long returnListId);
	
	/**
	 * 根据退货单ID查询退货单信息
	 * @param returnListId 退货单ID
	 * @return
	 */
	public ReturnList getReturnList(Long returnListId);
	
	/**
	 * 修改进货单付款状态
	 * @param state 1：已退 2：未退
	 * @param id 付款单ID
	 */
    public void updateState(Integer state ,Long id);
    
    /**
   	 * 根据退货单ID条件查询进货商品信息
   	 * @param returnListId 退货单ID
   	 * @param goodsTypeId 商品类别ID
   	 * @param codeOrName 商品编码或名称
   	 * @return 
   	 */
   	public List<ReturnListGoods> getReturnListGoodsByReturnListId(Long returnListId, Long goodsTypeId, String codeOrName);

	/**
	 * 修改进货单付款状态为已支付
	 *
	 * @param id 进货单ID
	 * @return
	 */
	void setPaid(Long id);
	/**
	 * 修改进货单付款状态为未支付
	 *
	 * @param id 进货单ID
	 * @return
	 */
	void setUnpaid(Long id);

	List<PurchaseListCountListItemVO> getReturnListGoodsByCondition(SelectReturnCondition selectReturnCondition);
}
